// 列配置
export let columns = [
  {
    title: "序号",
    type: "index",
    width: "70",
    align: "center"
  },
  {
    title: "任务ID",
    key: "jobId"
  },
  {
    title: "bean名称",
    key: "beanName"
  },
  {
    title: "参数",
    key: "params"
  },
  {
    title: "cron表达式",
    key: "cronExpression"
  },
  {
    title: "备注",
    key: "remark"
  },
  {
    title: "状态",
    slot: "status"
  },
  {
    title: "操作",
    slot: "operation",
    width: 420
  },
];

// 日志列配置
export let logColumns = [
  {
    title: "序号",
    type: "index",
    width: "70",
    align: "center"
  },
  {
    title: "任务ID",
    key: "jobId"
  },
  {
    title: "bean名称",
    key: "beanName"
  },
  {
    title: "参数",
    key: "params"
  },
  {
    title: "状态",
    slot: "status"
  },
  {
    title: "耗时(单位：毫秒)",
    key: "times"
  },
  {
    title: "执行时间",
    key: "createTime"
  },
];

// 分页配置
export let pageConfig = {
  pageSize: 20,
  pageNow: 1,
  total: 0,
  loading: false,
};

// 表单数据
export let formValidate = {
  beanName: '',
  params: '',
  cronExpression: '',
  remark: '',
  jobId: null,
  status: 0,
};

// 表单验证规则
export let ruleValidate = {
  name: [{required: true, message: "bean名称不能为空", trigger: "blur"}],
  params: [{required: true, message: "参数不能为空", trigger: "blur"}],
  cronExpression: [{required: true, message: "cron表达式不能为空", trigger: "blur"}],
};

// 任务状态
export let status = [{
  value: 0,
  key: "正常",
},{
  value: 1,
  key: "暂停",
}];

// 任务状态
export let logStatus = [{
  value: 0,
  key: "成功",
},{
  value: 1,
  key: "失败",
}];